/*----------------timepart.less(start)--------------*/
.timepart{
    padding: @px1 0;
    background-color:white;
}
//行
.timepart-row{
    position: relative;
    display: -webkit-box;
    height: @px18;
    margin: @px20 @px20 @px40 @px20;
}
//进度条
.timepart-progress{
    position: relative;
    //pointer-events:none;
    display: none;
    position: absolute;
    top:0;
    left:0;
    bottom:0;
    &.active{
        background-color: @primary-bg;
    }
    &.disabled{
        background-color: @body-bg;
    }
}
//段
.timepart-part{
    position: relative;
    display: block;
    height:100%;
    //开始和结束时间
    .timepart-startTime,.timepart-endTime{
        float:left;
        margin-top:@px22;
        font-size:@px13;
        margin-left:-@px16;
    }
    //只显示开始时间
    .timepart-startTime{
        display: inline-block;
    }
    .timepart-endTime{
        display: none;
    }
    //双行时间不显示
    &:nth-of-type(even){
        .timepart-startTime,.timepart-endTime{
            display:none;
        }
    }
    //第一个part
    &:nth-of-type(1){
        border-width:@px1;
        .timepart-startTime{
            margin-left:-@px7;
        }
    }
    //最后一个part
    &:nth-last-of-type(1){
        .timepart-startTime{
            display: none;
        }
        .timepart-endTime{
            display:inline-block;
            float:right;
            margin-right:-@px7;
        }
    }
    &.active{
        background-color: @primary-bg;
    }
    &.disabled{
        color:@sub-color;
    }
}

.timepart[data-col="2"] .timepart-row .timepart-part{
    width:50%;
}
.timepart[data-col="3"] .timepart-row .timepart-part{
    width:33%;
}
.timepart[data-col="3"] .timepart-row .timepart-part:nth-of-type(even){
    width:34%;
}
.timepart[data-col="4"] .timepart-row .timepart-part{
    width:25%;
}
.timepart[data-col="5"] .timepart-row .timepart-part{
    width:20%;
}
.timepart[data-col="6"] .timepart-row{
    .timepart-part{
        width:17%;
    }
    .timepart-part:nth-of-type(2){
        width:16%;
    }
    .timepart-part:nth-of-type(5){
        width:16%;
    }
}

/*=======边框=======*/
.timepart-row:before,.timepart-row:after,.timepart-part:before,.timepart-part:after,.timepart-progress:before,.timepart-progress:after {
    content: '';
    display: block;
    position: absolute;
    background-color: @border;

    //兼容UC线条不显示的BUG
    z-index:1;overflow: hidden;-webkit-backface-visibility:hidden;
}
//左竖线
.timepart-row:before,.timepart-progress:before{
    top: 0;
    right: auto;
    bottom: auto;
    left: 0;
    width: @px1;
    height: 100%;
    -webkit-transform-origin:left center;
}
//上横线
.timepart-row:after{
    top: 0;
    right: auto;
    bottom: auto;
    left: 0;
    height: @px1;
    width: 100%;
    -webkit-transform-origin:center top;
}
//右竖线
.timepart-part:before,.timepart-progress:after{
    top: 0;
    bottom: auto;
    left: auto;
    right: 0;
    width: @px1;
    height: 100%;
    -webkit-transform-origin:right center;
}
//下横线
.timepart-part:after{
    top: auto;
    right: auto;
    bottom: 0;
    left: 0;
    height: @px1;
    width: 100%;
    -webkit-transform-origin:center bottom;
}
@media only screen and (-webkit-min-device-pixel-ratio: 2) {
    //横线
    .timepart-row:after,.timepart-part:after {
        -webkit-transform: scaleY(0.5);
    }
    //竖线
    .timepart-row:before,.timepart-part:before,.timepart-progress:before,.timepart-progress:after {
        -webkit-transform: scaleX(0.5);
    }
}
@media only screen and (-webkit-min-device-pixel-ratio: 3) {
    //横线
    .timepart-row:after,.timepart-part:after {
        -webkit-transform: scaleY(0.33);
    }
    //竖线
    .timepart-row:before,.timepart-part:before,.timepart-progress:before,.timepart-progress:after {
        -webkit-transform: scaleX(0.33);
    }
}
/*----------------timepart.less(end)--------------*/